<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover" />
    <title>全员考评</title>
    <link rel="stylesheet" href="{{asset('/addons/jquery-weui-build/css/weui.min.css')}}">
    <link rel="stylesheet" href="{{asset('/addons/jquery-weui-build/css/jquery-weui.css')}}">
    <link rel="stylesheet" href="/css/system/front-iconfont.css?v=2018121301">
    <link rel="stylesheet" href="/css/admin/newadd.css">
    {{--<link rel="stylesheet" href="{{asset('/css/system/common.css')}}">--}}
    <link rel="stylesheet" href="{{asset('/addons/bootstrap/css/bootstrap.min.css')}}">
    <link rel="stylesheet" href="/css/admin/mobileSelect.css">
    @if($skinid == 3)
        <link rel="stylesheet" href="/css/system/common.css?v=2018121301">
        <link rel="stylesheet" href="/css/system/full-evaluation.css?v={{time()}}">
    @elseif($skinid == 1)
        <link rel="stylesheet" href="/css/theme-blue/system/common.css">
        <link rel="stylesheet" href="/css/theme-blue/system/full-evaluation.css?v={{time()}}">
    @elseif($skinid == 2)
        <link rel="stylesheet" href="/css/theme-pink/system/iconfont-pink.css">
        <link rel="stylesheet" href="/css/theme-pink/system/common.css">
        <link rel="stylesheet" href="/css/theme-pink/system/full-evaluation.css?v={{time()}}">
    @endif
    <style>
        #trigger3 {
            cursor: pointer;
            text-align: right;
            margin-right: 10px;
            color:#535353;
        }
        .weui-cell__bd:after{
            content: " ";
            display: inline-block;
            height: 6px;
            width: 6px;
            border-width: 2px 2px 0 0;
            border-color: #c8c8cd;
            border-style: solid;
            -webkit-transform: matrix(.71,.71,-.71,.71,0,0);
            transform: matrix(.71,.71,-.71,.71,0,0);
            position: relative;
            top: -2px;
            position: absolute;
            top: 50%;
            margin-top: -4px;
            right: 12px;
        }
    </style>
</head>
<body ontouchstart>
<div class="weui-cell" style="height:44px;">
    <div class="weui-cell__hd">
        <p style="margin-bottom: 0;"><i class="icon iconfont icon-kaoqin year-param-icon" style="font-size: 24px;"></i><span style="vertical-align: middle; margin-left: 10px; color:#535353;">选择时间</span></p>
    </div>
    <div class="weui-cell__bd">
        <div id="trigger3">{{$year_param}}</div>
    </div>
</div>
<div class="mian-container">

    <div class="whole-performance">
        @foreach($perf as $p)
            <div class="weui-cells">
                <div class="weui-cell">
                    <div class="weui-cell__hd">
                        @if($p->class_id == 1)
                            <img class="floor-img" src='/img/group-floora{{$skinid}}.png'>
                        @elseif($p->class_id == 2)
                            <img class="floor-img" src="/img/group-floorb{{$skinid}}.png" style="margin-left: 0.35rem;margin-right: -0.35rem;">
                        @else
                            <img class="floor-img" src="/img/group-floorc{{$skinid}}.png" style="margin-left: 0.75rem;margin-right: -0.75rem;">
                        @endif
                    </div>
                    <div class="weui-cell__bd">
                        <p class="whole-name">{{$p->group_name}}</p>
                    </div>
                </div>
                @foreach($p->users as $pu)
                    <a class="parent-div" href="{{url('/user/performance/perf?uid='.$pu->id)}}">
                        <div class="f-left pull-left">{{$pu->qw_name}}</div>
                        <div class="progress progress-striped active">
                            <div class="progress-bar progress-bar-info" role="progressbar" data-num="{{getUserPerform($year_param,$pu->id)->total}}" aria-valuenow="{{getUserPerform($year_param,$pu->id)->total}}" aria-valuemin="0" aria-valuemax="150">

                            </div>
                        </div>
                        <div class="progress-hidden-info"></div>
                        <img class="test-img" src="/img/test.png">
                        <div class="f-right pull-left">{{mb_substr(round(getUserPerform($year_param,$pu->id)->total,2),0,5)}}</div>
                        <img class="flag-img" src="/img/flag.png">
                        <span class="num-six">60</span><span class="num-ten">100</span>
                    </a>
                @endforeach
                {{--<div class="parent-div">
                    <div class="f-left pull-left">王宏达</div>
                    <div class="progress progress-striped active">
                        <div class="progress-bar progress-bar-info" role="progressbar" data-num="102" aria-valuenow="102" aria-valuemin="0" aria-valuemax="120">
                        </div>
                    </div>
                    <div class="f-right pull-left">102</div>
                    <span class="num-six">60</span><span class="num-ten">100</span>
                </div>
                <div class="parent-div">
                    <div class="f-left pull-left">王达</div>
                    <div class="progress progress-striped active">
                        <div class="progress-bar progress-bar-info" role="progressbar" data-num="112" aria-valuenow="112" aria-valuemin="0" aria-valuemax="120">
                        </div>
                    </div>
                    <div class="f-right pull-left">112</div>
                    <span class="num-six">60</span><span class="num-ten">100</span>
                </div>--}}
            </div>
        @endforeach
        {{--<div class="weui-cells">
          <div class="weui-cell">
            <div class="weui-cell__hd">
              <img class="floor-img" src="{{asset('/img/group-floor1.png')}}">
            </div>
            <div class="weui-cell__bd">
                <p class="whole-name">执行董事</p>
            </div>
          </div>
           <div class="parent-div">
               <div class="f-left pull-left">王宏达</div>
               <div class="progress progress-striped active">
                   <div class="progress-bar progress-bar-info" role="progressbar" data-num="102" aria-valuenow="102" aria-valuemin="0" aria-valuemax="120">
                   </div>
               </div>
               <div class="f-right pull-left">102</div>
               <span class="num-six">60</span><span class="num-ten">100</span>
           </div>
           <div class="parent-div">
               <div class="f-left pull-left">王达</div>
               <div class="progress progress-striped active">
                   <div class="progress-bar progress-bar-info" role="progressbar" data-num="112" aria-valuenow="112" aria-valuemin="0" aria-valuemax="120">
                   </div>
               </div>
               <div class="f-right pull-left">112</div>
               <span class="num-six">60</span><span class="num-ten">100</span>
           </div>
        </div>
        <div class="weui-cells">
          <div class="weui-cell">
            <div class="weui-cell__hd">
              <img class="floor-img" src="{{asset('/img/group-floor2.png')}}">
            </div>
            <div class="weui-cell__bd">
                <p class="whole-name">总经办</p>
            </div>
          </div>
           <div class="parent-div">
               <div class="f-left pull-left">王宏达</div>
               <div class="progress progress-striped active">
                   <div class="progress-bar progress-bar-info" role="progressbar" data-num="22" aria-valuenow="22" aria-valuemin="0" aria-valuemax="120">
                   </div>
               </div>
               <div class="f-right pull-left">22</div>
               <span class="num-six">60</span><span class="num-ten">100</span>
           </div>
        </div>
        <div class="weui-cells">
          <div class="weui-cell">
            <div class="weui-cell__hd">
              <img class="floor-img" src="{{asset('')}}img/group-floor3.png">
            </div>
            <div class="weui-cell__bd">
                <p class="whole-name">开发部</p>
            </div>
          </div>
            <div class="parent-div">
               <div class="f-left pull-left">王宏达</div>
               <div class="progress progress-striped active">
                   <div class="progress-bar progress-bar-info" role="progressbar" data-num="62" aria-valuenow="62" aria-valuemin="0" aria-valuemax="120">
                   </div>
               </div>
               <div class="f-right pull-left">62</div>
               <span class="num-six">60</span><span class="num-ten">100</span>
           </div>
        </div>--}}
        
    </div>
    @include('frontuser.caidan')
</div>
<script src="{{asset('/kaohe/js/jquery-2.1.4.min.js')}}"></script>
<script src="{{asset('/addons/jquery-weui-build/js/fastclick.js')}}"></script>
<script>
    $(function() {
        document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';
        FastClick.attach(document.body);
    });
</script>
<script src="{{asset('/addons/jquery-weui-build/js/jquery-weui.min.js')}}"></script>
<script src="/js/mobileSelect.js"></script>
<script>
    $(document).ready(function () {
        $('.whole-name').click(function(){
            $(this).toggleClass('whole-up');
            $(this).parent().parent().siblings('.parent-div').toggleClass('block');
        })
        $('.parent-div').click(function(){
            $(this).find('.sec-name').toggleClass('sec-up');
            $(this).siblings('.childern-div').toggle();
        })
        $('.kaohe-item').click(function(){
            $('.front-show-hidden').toggle();
        })
        $('.set-btn').click(function () {
            $('.set-hidden').toggle();
        })
        $('.parent-div').each(function () {
            $(this).find('.progress-bar').css('width', ($(this).find('.progress-bar').data('num')/150)*100+'%');
            if($(this).find('.progress-bar').data('num')<60){
                $(this).find('.progress-bar').css('background-color','#E86C64');
            }else if($(this).find('.progress-bar').data('num')>=60&&$(this).find('.progress-bar').data('num')<80){
                $(this).find('.progress-bar').css('background-color','#FFC876');
            }else if($(this).find('.progress-bar').data('num')>=80&&$(this).find('.progress-bar').data('num')<100){
                $(this).find('.progress-bar').css('background-color','#bfd980');
            }else if($(this).find('.progress-bar').data('num')>=100&&$(this).find('.progress-bar').data('num')<150){
                $(this).addClass('flag-mark');
                $(this).addClass('full-mark');
                var re=(2.6-0.026*($(this).find('.f-right').text()-100))+'rem';
                $(this).find('.progress-hidden-info').css('width',$(this).find('.progress-striped').width())
                $(this).find('.test-img').css('right',re)
            }else if($(this).find('.progress-bar').data('num')>=150){
                $(this).addClass('flag-mark');
                $(this).addClass('full-mark');
                $(this).find('.progress-bar').css('width',$(this).find('.progress-striped').width());
                $(this).find('.progress-hidden-info').css('width',$(this).find('.progress-striped').width());
                $(this).find('.test-img').css('right',1.1+'rem');
            }
        });
    })
</script>
<script>
    $(document).ready(function(){
        var UplinkData = {!! $yearlist !!};
        var mobileSelect3 = new MobileSelect({
            trigger: '#trigger3',
            title: '选择时间',
            wheels: [
                {data: UplinkData}
            ],
            //     keyMap: {
            //        id:'id',
            //        value: 'name',
            //        childs :'son'
            //      },
            position: [0, 1],
            callback: function (indexArr, data) {
                //
                var year = data[0].id;

                window.location.href = '/user/performance/all-perf?year=' + year ;
                console.log(data[0].id); //返回选中的json数据
            }
        });
    });
</script>
</body>
</html>